package com.example.demo.entity;

import java.io.Serializable;
import java.sql.Date;
import java.util.Objects;

public class NurPatientRel implements Serializable {
    private Integer rid;
    private Integer tid;
    private Integer oid;
    private Date rstart;
    private Date rend;
    private Integer nid;

    public NurPatientRel(Integer rid, Integer tid, Integer oid, Date rstart, Date rend, Integer nid) {
        this.rid = rid;
        this.tid = tid;
        this.oid = oid;
        this.rstart = rstart;
        this.rend = rend;
        this.nid = nid;
    }

    public NurPatientRel() {
    }

    public Integer getRid() {
        return rid;
    }

    public void setRid(Integer rid) {
        this.rid = rid;
    }

    public Integer getTid() {
        return tid;
    }

    public void setTid(Integer tid) {
        this.tid = tid;
    }

    public Integer getOid() {
        return oid;
    }

    public void setOid(Integer oid) {
        this.oid = oid;
    }

    public Date getRstart() {
        return rstart;
    }

    public void setRstart(Date rstart) {
        this.rstart = rstart;
    }

    public Date getRend() {
        return rend;
    }

    public void setRend(Date rend) {
        this.rend = rend;
    }

    public Integer getNid() {
        return nid;
    }

    public void setNid(Integer nid) {
        this.nid = nid;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        NurPatientRel that = (NurPatientRel) o;
        return Objects.equals(rid, that.rid) && Objects.equals(tid, that.tid) && Objects.equals(oid, that.oid) && Objects.equals(rstart, that.rstart) && Objects.equals(rend, that.rend) && Objects.equals(nid, that.nid);
    }

    @Override
    public int hashCode() {
        return Objects.hash(rid, tid, oid, rstart, rend, nid);
    }

    @Override
    public String toString() {
        return "NurPatientRel{" +
                "rid=" + rid +
                ", tid=" + tid +
                ", oid=" + oid +
                ", rstart=" + rstart +
                ", rend=" + rend +
                ", nid=" + nid +
                '}';
    }
}
